#ifndef _simple_linked_list_h_
#define _simple_linked_list_h_

/*! \file simple_linked_list.h
 *  \brief 
 *  This is created by Drew Whitehurst. The point of it to a 
 *  simple use of a generic linked list.
 * */
 

#include <stdio.h>
#include <pthread.h>

typedef struct SimpleNodeStruct
{
  void                    * vpNodeData;
  struct SimpleNodeStruct * xpNextNode;
} xConcreteNode, *xpSimpleNodeHandle;

typedef struct SimpleListStruct
{
  xpSimpleNodeHandle xpListBase;
  int                iListLength;
  int                iNodeSize;
  int                iCurrentPosition;
  int                iMaxListLength;
  pthread_mutex_t  * xpMutex;
} xConcreteList, * xpSimpleListHandle, * LinkListObject;


xpSimpleListHandle xpSimLL_CreateList( int size, int length );
void vSimLL_DestroyList( xpSimpleListHandle list );
int iSimLL_AddNodeToList( xpSimpleListHandle list, void * input_node );
int vSimLL_ReadNode( xpSimpleListHandle list, void * data, int position );
void vSimLL_RemoveNode( xpSimpleListHandle list, void * data, int position );
int iSimLL_GetAndRemoveFirstNode( xpSimpleListHandle list, void * return_buff );
int iSimLL_GetListLength( xpSimpleListHandle list );
void vSimLL_FlushList( xpSimpleListHandle list );

#endif /*_simple_linked_list_h_ */
